import 'package:flutter/cupertino.dart';

class SignInfo {
  final int typeId;
  final String typeName, typeInfo;

  SignInfo(this.typeId, this.typeName, this.typeInfo);
}

class SignInfoModel extends ChangeNotifier {
  // # key_type为密钥类型，可选项有：
  // # infinix_p：android P之前(包含P)的infinix品牌签名
  // # tecno_p: android P之前(包含P)的tecno品牌签名
  // # infinix_q: android Q之后(包含Q)的infinix品牌签名
  // # tecno_q: android Q之后(包含Q)的tecno品牌签名
  // # lineage_pqti: android Q之后(包含Q) tecno + infinix轮替签名
  // # itel: itel品牌签名
  final List<SignInfo> _signInfoList = [
    SignInfo(1, "infinix_p", "android P之前(包含P)的infinix品牌签名"),
    SignInfo(2, "tecno_p", "android P之前(包含P)的tecno品牌签名"),
    SignInfo(3, "infinix_q", "android Q之后(包含Q)的infinix品牌签名"),
    SignInfo(4, "tecno_q", "android Q之后(包含Q)的tecno品牌签名"),
    SignInfo(5, "lineage_pqti", "android Q之后(包含Q) tecno + infinix轮替签名"),
    SignInfo(6, "itel", "itel品牌签名")
  ];

  SignInfo? _currentSignInfo = null;

  bool _isHideDialog = false;

  set isHideDialog(bool isHide) {
    _isHideDialog = isHide;
    notifyListeners();
  }

  bool get isHideDialog => _isHideDialog;

  set currentSignInfo(SignInfo? signInfo) {
    print("signInfo:${signInfo?.typeName}");
    _currentSignInfo = signInfo;
    notifyListeners();
  }

  SignInfo? get currentSignInfo => _currentSignInfo;

  List<SignInfo> getSignInfoList() {
    return _signInfoList;
  }
}
